package com.dhecp.project.purchase.service;

import java.util.List;
import java.util.Map;

import com.dhecp.common.core.domain.AjaxResult;
import com.dhecp.project.purchase.domain.Distribution;
import com.dhecp.project.purchase.domain.DistributionSon;

public interface DistributionService {

    /**
     *@Description: 查询指定单nid的首记录
     *@Param: nid 必要参数：当前 单据编码
     *@return: com.dhecp.project.hr.domain.Distribution
     *@Author: hlf
     *@date: 2022-05-09 9:40
     */
    Distribution queryFirstRecord(Map<String, Object> params) throws Exception;

    /**
     *@Description: 查询指定单nid的整单录
     *@Param: nid 必要参数：当前 单据编码
     *@return: java.util.List<com.dhecp.project.hr.domain.Distribution>
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    List<Distribution> queryListByGoodsID(Map<String, Object> params) throws Exception;


    /**
     *@Description: 查询指定单记录
     *@Param: nid 必要参数：当前 单据编码
     *@return: com.dhecp.project.storage.domain.Distribution
     *@Author: hlf
     *@date: 2022-05-09 9:40
     */
    Distribution findByGuid(Map<String, Object> params) throws Exception;


    /**
     *@Description: 查询指定单记录（通过商品编码和SKUID）
     */
    Distribution findByPcodeAndSkuid(String pcode, String skuid);

    /**
     *@Description: 根据Guid 查询子件数据
     *@Param: [pGuid]
     *@return: java.util.List<com.dhecp.project.purchase.domain.DistributionSon>
     *@Author: hlf
     *@date: 2022-08-22 13:48
     */
    List<DistributionSon> querySonList(String goodsID) throws Exception;
    List<DistributionSon> querySonList2(String pGuid) throws Exception;

    /**
     *@Description: 查询
     *@Param: [params]
     *@return: java.util.List<com.dhecp.project.hr.domain.Distribution>
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    List<Distribution> queryList(Map<String, Object> params) throws Exception;
    List<Distribution> queryList2(Map<String, Object> params) throws Exception;


    /**
    *@Description: 查询整单
    *@Param: [params]
    *@return: java.util.List<com.dhecp.project.purchase.domain.Distribution>
    *@Author: hlf
    *@date: 2022-09-17 15:25
    */
    List<Distribution> queryGroupList(Map<String, Object> params) throws Exception;

    /**
    *@Description: 获取数据总数
    *@Param: [params]
    *@return: java.lang.Integer
    *@Author: hlf
    *@date: 2022-08-31 9:34
    */
    Integer queryCount(Map<String, Object> params)throws Exception;


    /**
     *@Description: 保存
     *@Param: moduleTable 必要参数：功能唯一标识
     *@Param: infoMap 必要参数：非网格字段（包括头部、底部所有显示和隐藏的字段）
     *@Param: infoItems 必要参数：对应实体类的json格式字符串
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    AjaxResult saveData(Map<String, Object> params);
    AjaxResult saveDataSon(Map<String, Object> params);

    /**
     *@Description: 删除
     *@Param: [params]
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:42
     */
    AjaxResult deleteData(Map<String, Object> params);


}
